From 4d6bc058122f681bef2727690aa75e3d8a0fd2a5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sat, 12 May 2007 12:41:40 +0100 Subject: [PATCH] hvm qemu: Fix write parameter masking for 64-bit guests. Signed-off-by: Keir Fraser --- tools/ioemu/target-i386-dm/helper2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c index c5a2ba9ad0..637a3eb4a4 100644 --- a/tools/ioemu/target-i386-dm/helper2.c +++ b/tools/ioemu/target-i386-dm/helper2.c @@ -495,7 +495,7 @@ void cpu_ioreq_xchg(CPUState *env, ioreq_t *req) void __handle_ioreq(CPUState *env, ioreq_t *req) { - if (!req->data_is_ptr && req->dir == IOREQ_WRITE && req->size != 4) + if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) && (req->size != sizeof(req->data))) req->data &= (1UL << (8 * req->size)) - 1; switch (req->type) { -- 2.30.2